#ifndef __GAME_MAP_MGR_H__
#define __GAME_MAP_MGR_H__

#include <unordered_map>
#include <memory>

#include "game_map.h"


class GameMapMgr
{
private:
    /* data */
public:
    GameMapMgr();
    ~GameMapMgr();
    GameMapMgr(const GameMapMgr&) = delete;
    const GameMapMgr operator=(const GameMapMgr&) = delete;

    static GameMapMgr& GetInstance();

    std::shared_ptr<GameMap> AddNewMap(int map_type_id, int map_unique_id);
    std::shared_ptr<GameMap> GetMap(int map_type_id, int map_unique_id);
    void DeleteMap(int map_type_id, int map_unique_id);

public:
    std::unordered_map<int, std::unordered_map<int, std::shared_ptr<GameMap>>> maps_;  // 类型ID->{唯一ID->obj}
};


#endif  // __GAME_MAP_MGR_H__